#!/bin/sh
paramnum=$#
if((paramnum==0)); then
echo no params;
exit;
fi

source /etc/profile
dateStr=$1
echo "analysis job is starting..."
hive -e "insert into mydb.user_info select count(DISTINCT id), dt from mydb.user_clicks where dt = '$dateStr' group by dt;"

echo "analysis job is finished..."
